package sctu.edu.java.year2016.team01.zhuming.day20160525.chapter6_3;

/**将今天的信息全部格式化输出，再将日期以年-月-日的形式输出。
 * Created by Administrator on 2016/5/25.
 */
import java.util.Date;
import java.util.Locale;
public class DaTeAndTime {
    public static void main(String[] args){
            Date today=new Date();

            System.out.println("现在是：");
        String cet=String.format(Locale.CHINA,"%tc",today);

             System.out.println(cet);
             System.out.println("将日期以年-月-日的形式输出:");

        String num=String.format(Locale.CHINA,"%tF",today);
                System.out.println(num);

    }
}

